About: "Extends ArcView to support CIB images (v3.1)."
LoadScript: 3
CanUnloadScript: 4
UnloadScript: 5
ExtVersion: 3100
)
(Script.2
Name: "CIB.ObjectsPresent"
SourceCode: "theProject = av.GetProject\nif (theProject = NIL) then\n return FALSE\nend\n\nfor each e in Clipboard.The\n if (e.Is(ITheme)) then\n theImgSrc = e.GetImgSrc\n theSrcName = theImgSrc.GetSrcName\n if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"cib\"))) then\n return TRUE\n end\n else\n if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"cib\")) then\n return TRUE\n end\n end\n elseif (e.Is(ViewFrame) and e.IsF
illed) then\n for each aTheme in e.GetView.GetThemes\n if (aTheme.Is(ITheme)) then\n theImgSrc = aTheme.GetImgSrc\n theSrcName = theImgSrc.GetSrcName\n if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"cib\"))) then\n return TRUE\n end\n else\n if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"cib\")) then\n return TRUE\n end\n end\n end\n end\n else
if (e.Is(PictureFrame) and e.IsFilled and e.IsFilledBy(FileName)) then\n theFillObj = e.GetFillObject\n if (ISrc.IsValidFileName(theFillObj)) then\n theISrc = ISrc.Make(SrcName.Make(theFillObj.AsString))\n if (theISrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"cib\")) then\n return TRUE\n end\n end\n end\nend\ntheDocs = av.GetProject.GetDocs\nfor each aDoc in theDocs\n if (aDoc.Is(View)) then\n for each aTheme in aDoc.GetThemes\n if (aTheme.Is(ITheme)) then\n theImgSrc = aTheme
.GetImgSrc\n theSrcName = theImgSrc.GetSrcName\n if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"cib\"))) then\n return TRUE\n end\n else\n if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"cib\")) then\n return TRUE\n end\n end\n end\n end\n elseif (aDoc.Is(Layout)) then\n for each aGraphic in aDoc.GetGraphics\n if (aGraphic.Is(PictureFrame) and aGraphi
c.IsFilled and aGraphic.IsFilledBy(FileName)) then\n theFillObj = aGraphic.GetFillObject\n if (ISrc.IsValidFileName(theFillObj)) then\n theISrc = ISrc.Make(SrcName.Make(theFillObj.AsString))\n if (theISrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"cib\")) then\n return TRUE\n end\n end\n elseif (aGraphic.Is(ViewFrame) and aGraphic.IsFilled) then\n for each aTheme in aGraphic.GetView.GetThemes\n if (aTheme.Is(ITheme)) then\n theImgS
SourceCode: "'for CIB, set the extension checking to false, so any files are shown...\nISrc.SetExtensionChecking(FALSE)"
)
(Script.4
Name: "CIB.CanUnload"
SourceCode: "' Run script CIB.ObjectsPresent to see if there is any ImgSrc in any View with a .cib extension.\n' Return result to boolean variable.\nobjectsPresent = av.Run(\"CIB.ObjectsPresent\", NIL)\n\n' If objectsPresent is TRUE the dll should not be unloaded\nreturn objectsPresent.Not"
)
(Script.5
Name: "CIB.Unload"
SourceCode: "'Set extension checking back on if CADRG is not installed\ntheExt = Extension.Find(\"CADRG Image Support\")\nif (theExt = NIL) then\n ISrc.SetExtensionChecking(TRUE)\nend\n"